package com.baijia.services.impl;

import com.baijia.authentication.AccountType;
import com.baijia.dao.UserDao;
import com.baijia.services.PassportService;
import com.baijia.services.UserService;

import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created by dudu on 2016/12/16.
 */
@Service
public class UserServiceImpl implements UserService {

    @Resource
    private PassportService passportService;

    @Resource
    private UserDao userDao;

    @Override
    public int updateMobile(String mobile, Long userId) {
//        if(passportService.validate(mobile, AccountType.USER.getCode())) {// 手机号码已经存在
//            return 0;
//        }
//        return userDao.updateMobile(mobile, userId);
        return 0;
    }
}
